package com.example.dish_model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 套餐菜品关系
 * </p>
 *
 * @author sjz
 * @since 2024-06-30
 */
@Getter
@Setter
@TableName("tb_setmeal_dish")
@Schema(name = "SetmealDish对象", description = "套餐菜品关系")
public class SetmealDish implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    @TableId("id")
    private String id;

    @Schema(description = "套餐id ")
    @TableField("setmeal_id")
    private String setmealId;

    @Schema(description = "菜品id")
    @TableField("dish_id")
    private String dishId;

    @Schema(description = "菜品名称 （冗余字段）")
    @TableField("name")
    private String name;

    @Schema(description = "菜品原价（冗余字段）")
    @TableField("price")
    private BigDecimal price;

    @Schema(description = "份数")
    @TableField("copies")
    private Integer copies;

    @Schema(description = "排序")
    @TableField("sort")
    private Integer sort;

    @Schema(description = "创建时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    @Schema(description = "更新时间")
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @Schema(description = "创建人")
    @TableField(value = "create_user",fill = FieldFill.INSERT)
    private String createUser;

    @Schema(description = "修改人")
    @TableField(value = "update_user",fill = FieldFill.INSERT_UPDATE)
    private String updateUser;

    @Schema(description = "是否删除")
    @TableField("is_deleted")
    private Integer isDeleted;
}
